#include "BaseObject.hpp"

BaseObject::BaseObject(){
    updateable = true;
    destroy = BaseObject::d_Clean;
    script[0] = 0;
    hasScript = false;
    index = 0;
}

/**
 * Initialize object.
 * @param s Object script.
 * @param i Object index.
 */
void BaseObject::init(const char* s, uint16_t i){
    setScript(s);
    index = i;
}

/**
 * Set object script name.
 * @param s Script name.
 */
void BaseObject::setScript(const char* s){
    strncpy(script, s, OBJECT_SCRIPT_LENGTH);
    script[OBJECT_SCRIPT_LENGTH] = 0;
}